package com.guit.hrms.verify.resume;

import com.guit.hrms.verify.resume.impl.AtLeastOneNotEmptyValidator;
import jakarta.validation.Constraint;
import jakarta.validation.Payload;

import java.lang.annotation.*;

@Target({ ElementType.TYPE }) // 注解作用于类上
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = AtLeastOneNotEmptyValidator.class) // 指定校验逻辑类
@Repeatable(AtLeastOneNotEmpties.class)
public @interface AtLeastOneNotEmpty {
    String message() default "至少有一个字段不能为空";
    Class<?>[] groups() default {};
    Class<? extends Payload>[] payload() default {};
    String[] fields(); // 需要校验的字段名
    Class<?> group();  // 指定校验组
}
